
package com.ami.kvm.jviewer.kvmpkts;

import java.awt.event.MouseEvent;

import javax.swing.event.MouseInputAdapter;

import com.ami.kvm.jviewer.gui.JViewerApp;

class RCMouseListener extends MouseInputAdapter {
	public void mouseMoved(MouseEvent paramMouseEvent) {
		if (!Mousecaliberation.ACCELERATION_FLAG) {
			Mousecaliberation.curX = paramMouseEvent.getX();
			Mousecaliberation.curY = paramMouseEvent.getY();

			if (Mousecaliberation.curX < 0)
				Mousecaliberation.curX = 0;
			if (Mousecaliberation.curY < 0)
				Mousecaliberation.curY = 0;
			if (Mousecaliberation.isCursorReset()) {
				Mousecaliberation.lastX = Mousecaliberation.curX;
				Mousecaliberation.lastY = Mousecaliberation.curY;
				Mousecaliberation.setCursorReset(false);
			}

			int i = Mousecaliberation.curX - Mousecaliberation.lastX;
			int j = Mousecaliberation.curY - Mousecaliberation.lastY;

			JViewerApp.getInstance().getRCView().mouseListener.splitandsend(i, j, true);

			Mousecaliberation.lastX = Mousecaliberation.curX;
			Mousecaliberation.lastY = Mousecaliberation.curY;
		}
	}
}
